-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve performance of getAllReportErrors #47780
improve performance of getAllReportErrors #47780
Conversation
Taking over! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-02.at.3.43.45.AM.movAndroid: mWeb ChromeScreen.Recording.2024-09-02.at.3.43.17.AM.moviOS: NativeScreen.Recording.2024-09-02.at.3.42.33.AM.moviOS: mWeb SafariScreen.Recording.2024-09-02.at.3.42.14.AM.movMacOS: Chrome / SafariScreen.Recording.2024-09-02.at.3.38.37.AM.movMacOS: DesktopScreen.Recording.2024-09-02.at.3.40.00.AM.mov |
hey @allroundexperts , do you think you'll be able to jump back into this shortly? |
Yep, finishing today. |
I can verify that the functionality is intact. @OlimpiaZurek Can you guide me on how you're measuring the function call time? |
@allroundexperts I use the Chrome DevTools Performance tab to measure function call time ( on web) Here’s a quick guide:
The simplest way to measure function execution time is to use the You can also find guide how to profile release builds here. |
@allroundexperts please let us know if you'd need any assistance with testing this performance aspect :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
We did not find an internal engineer to review this PR, trying to assign a random engineer to #47691 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please list the tests that you did for this PR?
No specific tests were done for this PR since it focuses on performance improvements rather than functional changes. Instead, I conducted performance profiling and attached before/after screenshots from trace analysis to demonstrate the impact of the changes. |
I understand, but I think all performance improvement should still validate with tests that they don't break functionality. |
6dea26f
to
8230778
Compare
@flodnv I tested the changes from this PR, verifying error handling and flow when submitting expenses, in particular by:
|
Thank you! Please add these to the PR description and I can merge 😁 |
Added 😁 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This PR improves performance of
getAllReportErrors
.In the latest trace coming from Jason thread
getAllReportErrors
took 340 ms. I tested this solution locally and managed to reduce the total execution time of this function from 77 ms to 21 ms. In Jason's case this should bring the execution time down to 100ms.Before:
After:
Details
Fixed Issues
$ #47691
PROPOSAL:
Tests
Enter an amount
/Enter a merchant name
are displayedOffline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop